package org.visu;

import java.util.ArrayList;
import java.util.Collections;

public class EmployeeMain {

	 static ArrayList<Employee> EmpList = new ArrayList<Employee>();

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Employee one = new Employee();
		one.setAddress("AMathikere1");
		one.setId(4);
		one.setName("abc");
		
		Employee two = new Employee();
		two.setAddress("DMathikere2");
		two.setId(1);
		two.setName("dcd");
		
		Employee three = new Employee();
		three.setAddress("CMathikere3");
		three.setId(3);
		three.setName("cde");
		
		EmpList.add(one);
		EmpList.add(two);
		EmpList.add(three);
		System.out.println("Employee List Before sorting"+EmpList);
		
		EmployeeAddressCompartor employeeAddressComparable = new EmployeeAddressCompartor();
		Collections.sort(EmpList,employeeAddressComparable);
		System.out.println("Employee List After sorting"+EmpList);
		
		
		EmployeeIdComparator employeeidComparable = new EmployeeIdComparator();
		Collections.sort(EmpList,employeeidComparable);
		System.out.println("Employee List After sorting"+EmpList);

	}

}
